Skip to content

fix: ad-hoc sign the macOS app so it opens after install - #59

Merged
cyenite merged 1 commit into
mainfrom
fix/macos-damaged-app
Nov 4, 2026
Merged

cyenite merged 1 commit into
mainfrom
fix/macos-damaged-app

Conversation

@cyenite

@cyenite cyenite commented Nov 4, 2026

Copy link
Copy Markdown
Owner

macOS reported the installed app as damaged and offered to move it to the Bin.

Cause

The release job turns certificate discovery off (CSC_IDENTITY_AUTO_DISCOVERY: 'false') and electron-builder.yml set no identity, so electron-builder skipped signing entirely: its schema states there is no automatic ad-hoc fallback. Packaging changes Electron's bundle, which breaks the ad-hoc signature Electron ships with, and on Apple Silicon a downloaded app with no valid signature is reported as damaged rather than as coming from an unidentified developer.

Fix

  • electron-builder.yml: mac.identity: '-' (ad-hoc signing) and mac.hardenedRuntime: false. With ad-hoc signing, hardened runtime's library validation rejects Electron's pre-signed frameworks, and it only matters for notarization, which needs a Developer ID.
  • docs/getting-started.md: first-launch steps for macOS 15 and later (Privacy & Security, Open Anyway), for earlier versions (right-click, Open), and the xattr -dr com.apple.quarantine fix for builds up to 0.11.0.
  • CHANGELOG.md: Fixed entry.

Verification

  • npx electron-builder --mac dir on Linux loads the new config and packages the app; signing is skipped there ("supported only on macOS").
  • Not verified on a Mac. The macos-latest release job signs; the first release built from this change needs a check that the installed app opens.

Switching to real signing later means removing identity: '-', re-enabling hardened runtime with entitlements, adding the certificate and notarization secrets, and letting the updater install on macOS.

macOS reported the installed app as damaged and offered to move it to
the Bin. With no Developer ID, electron-builder left the app unsigned
(it has no ad-hoc fallback), and packaging breaks Electron's own
signature, so Apple Silicon treats the download as damaged.

- electron-builder.yml: mac.identity '-' for ad-hoc signing, and
  hardenedRuntime off, since with ad-hoc signing its library
  validation rejects Electron's frameworks and it only matters for
  notarization.
- Getting started: first-launch steps for macOS 15 and later (Open
  Anyway in Privacy & Security), for earlier versions, and the xattr
  fix for builds up to 0.11.0.
@cyenite cyenite mentioned this pull request Nov 4, 2026
@cyenite
cyenite merged commit 5fbd988 into main Nov 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant